# coding=utf-8

if __name__ == '__main__':
    di = 500
    xiao = 500
    da = 500 * 2

    first = di + 3 * xiao
    second = first + 3 * xiao
    third = second + 3 * da
    fourth = third + 3 * da

    result = first + second + third + fourth
    print(result)